<?php

class Core_Model_DbTable_CurrencyUnits extends YouNet_Db_Table
{
	const TABLE_NAME = 'currency_unit';
	protected $_name = self::TABLE_NAME;
	protected $_rowClass = 'Core_Model_CurrencyUnit';
	private static $_instance;
	/**
	 *
	 * @return Core_Model_DbTable_Stores 
	 */
	public static function getInstance()
	{
		if (is_null(self::$_instance))
		{
			self::$_instance = new self();
		}
		return self::$_instance;
	}

	public function getAssocListCurrency()
	{
		$list = array();
		
		$listRows = $this->fetchAll();
		
		foreach($listRows as $row)
		{
			$list[$row->code] = $row->text;
		}
		
		return $list;
	}
}
